<h1>Editing run</h1>

<% form_for(@run) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label "Mu IP" %><br />
    <%= f.text_field :mu_ip %>
  </p>
  
  <% if !Run.host_roles.nil? %>
  <table>
    <% Run.host_roles.each do | role | %>
    <tr>
      <td><%= role %></td>      
      <td>
        <select name=<%= "host_#{role}" %>
        <% Run.host_names.each do | h | %>
          <option value="<%="#{h}"%>"><%="#{h}"%></option>
        <% end %>
      </select>
      </td>
    </tr>
    <% end %>
  </table>
  <% end %>

  <p>
    <%= f.label :scenario_name %><br />
    <%= f.text_field :scenario_name %>
  </p>
  <p>
    <%= f.label :scenario_uuid %><br />
    <%= f.text_field :scenario_uuid %>
  </p>
  <p>
    <%= f.label :testsuite_name %><br />
    <%= f.text_field :testsuite_name %>
  </p>
  <p>
    <%= f.label :testsuite_uuid %><br />
    <%= f.text_field :testsuite_uuid %>
  </p>
  <p>
    <%= f.submit 'Update' %>
  </p>
<% end %>

<%= link_to 'Show', @run %> |
<%= link_to 'Back', runs_path %>